//引入一个页面
import Vue from "vue";
import Router from "vue-router";

Vue.use(Router);

//引入wel.vue文件作为路由
import wel from "../views/wel.vue";
import second from "../views/second.vue";
import details from "../views/details.vue";

import secondaaa from "../views/secondaaa.vue";

//配置路组件和注册
//const表示可以修改的常量
const routes = [
	{
		//路由的名称
		name:"wel",
		//路由的路径
		path:"/",
		//vue文件作为模板引入
		component:wel,
	},{
		name:"second",
		path:"/second",
		component:second,
	},{
		name:"secondaaa",
		path:"/secondaaa",
		component:secondaaa,
	},{
		name:"details",
		path:"/details",
		component:details,
	}
]

//创建vue-router的实例
//注意：Router对象的路由配置，属性名routes,切记不要改动
const router =new Router({
	routes
});
//输出给其他文件使用router对象
export default router;
